project(
  plugins_manager_appfwk
  LANGUAGES CXX
)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOUIC_SEARCH_PATHS (ui))
find_package(Qt5 COMPONENTS Widgets Core REQUIRED)

add_definitions(-DQLS_PLUGINS_MANAGER_APPFWK_LIBRARY)

set(_srcs
    src/qls_plugins_manager_appfwk.cpp
    src/qls_plugins_manager_tablewidget.cpp
    src/qls_plugin_widget.cpp
    src/qls_vtabbar.cpp
)

set(_headers
    include/plugins_manager_appfwk/qls_plugins_manager_appfwk.h
    include/plugins_manager_appfwk/qls_plugins_manager_tablewidget.h
    include/plugins_manager_appfwk/qls_plugin_widget.h
    include/plugins_manager_appfwk/qls_vtabbar.h
    include/plugins_manager_appfwk/qls_plugins_manager_appfwk_global.h
)

set(_ui
    ui/qls_plugins_manager_tablewidget.ui
    ui/qls_plugin_widget.ui
)

add_library(plugins_manager_appfwk SHARED ${_srcs} ${_headers} ${_ui})
target_link_libraries(plugins_manager_appfwk PUBLIC
    plugins_manager
    Qt5::Widgets Qt5::Core ${CMAKE_THREAD_LIBS_INIT}
)
target_link_libraries(plugins_manager_appfwk PRIVATE
    themes_manager log settings
)
target_include_directories(plugins_manager_appfwk PUBLIC include)
